home *** CD-ROM | disk | FTP | other *** search
- property ancestor
- global frameLimit, currentFrame, dirtyFlag
-
- on birth me
- set the ancestor of me to birth(script "recordMethods parent")
- return me
- end
-
- on record me
- buildFilterList(me)
- set countSoundLoopData to count(soundLoopData)
- if countSoundLoopData < currentFrame then
- set theSoundFrame to getLast(soundLoopData)
- repeat with theFrameNumber = countSoundLoopData + 1 to currentFrame
- append(soundLoopData, copyList(theSoundFrame))
- end repeat
- end if
- set theSoundName to getAt(curClipRecord, 2)
- set theSoundCastNum to getAt(curClipRecord, 3)
- preLoadCast(theSoundCastNum)
- set overFlow to 0
- if currentFrame < frameLimit then
- puppetSound(1, theSoundCastNum)
- if currentFrame > count(scoreData) then
- setAt(scoreData, currentFrame, copyList(autoHoldFrame))
- end if
- set theSoundFrame to list(theSoundName, theSoundCastNum)
- setAt(soundLoopData, currentFrame, theSoundFrame)
- setKrusty(playbackMgr)
- showFrame(playbackMgr, currentFrame, -1000)
- incrementFrame()
- else
- set overFlow to 1
- end if
- startTimer()
- repeat while soundBusy(1) and (the timer < 180)
- if currentFrame < frameLimit then
- if currentFrame > count(scoreData) then
- setAt(scoreData, currentFrame, copyList(autoHoldFrame))
- end if
- set theSoundFrame to list(theSoundName, theSoundCastNum)
- setAt(soundLoopData, currentFrame, theSoundFrame)
- setKrusty(playbackMgr)
- showFrame(playbackMgr, currentFrame, -1000)
- incrementFrame()
- next repeat
- end if
- set overFlow to 1
- exit repeat
- end repeat
- set oldVolume to the volume of sound 1
- repeat while the volume of sound 1 > 0
- startTimer()
- set the volume of sound 1 to the volume of sound 1 - 8
- repeat while the timer < 6
- end repeat
- end repeat
- puppetSound(1, 0)
- updateStage()
- set the volume of sound 1 to oldVolume
- if currentFrame < count(scoreData) then
- repeat with theFrameNumber = currentFrame to count(scoreData)
- set theSoundFrame to list(theSoundName, theSoundCastNum)
- setAt(soundLoopData, theFrameNumber, theSoundFrame)
- end repeat
- end if
- if overFlow then
- showOverFlowDialog(me)
- end if
- extendClips(me)
- if currentFrame > 1 then
- decrementFrame()
- end if
- setKrusty(playbackMgr)
- showFrame(playbackMgr, currentFrame, 0)
- set dirtyFlag to 1
- updateTheBrain(appMgr)
- cursor(-1)
- end
-